package com.example.selfcontrol.dto;

import com.example.selfcontrol.entity.resp.CommentResponse;
import lombok.Data;
import java.util.Date;
import java.util.List;

@Data
public class CommentDTO {
    private Long id ;
    private String content ;
    private Date createtime ;

    private Long attachArticle ;

    // 根据id找到对应的User补全下面字段
    private String author ;
    private String authorPicture ;

    private List<CommentResponse> subCommentList  ;// 子评论列表 - 按照时间顺序从早到晚

    public CommentDTO(Long id, String content, Date createtime, Long attachArticle, String author, String authorPicture, List<CommentResponse> subCommentList) {
        this.id = id;
        this.content = content;
        this.createtime = createtime;
        this.attachArticle = attachArticle;
        this.author = author;
        this.authorPicture = authorPicture;
        this.subCommentList = subCommentList;
    }
}
